package com.svms.service.vo;

import java.io.Serializable;
import java.util.Date;

/**
 * @author om39a
 * 
 */
public class MovementVO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public String movementId;
	public VehicleVO vehicleVO;
	public String startPlace;
	public String endPlace;
	public String stuffingPlace;
	public Date startDate;
	public Date endDate;
	public String distanceTraveled;
	public ResultCodeVO resultCode;

	public String getMovementId() {
		return movementId;
	}

	public void setMovementId(String movementId) {
		this.movementId = movementId;
	}

	public VehicleVO getVehicleVO() {
		return vehicleVO;
	}

	public void setVehicleVO(VehicleVO vehicleVO) {
		this.vehicleVO = vehicleVO;
	}

	public String getStartPlace() {
		return startPlace;
	}

	public void setStartPlace(String startPlace) {
		this.startPlace = startPlace;
	}

	public String getEndPlace() {
		return endPlace;
	}

	public void setEndPlace(String endPlace) {
		this.endPlace = endPlace;
	}

	public String getStuffingPlace() {
		return stuffingPlace;
	}

	public void setStuffingPlace(String stuffingPlace) {
		this.stuffingPlace = stuffingPlace;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getDistanceTraveled() {
		return distanceTraveled;
	}

	public void setDistanceTraveled(String distanceTraveled) {
		this.distanceTraveled = distanceTraveled;
	}

	public ResultCodeVO getResultCode() {
		return resultCode;
	}

	public void setResultCode(ResultCodeVO resultCode) {
		this.resultCode = resultCode;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((distanceTraveled == null) ? 0 : distanceTraveled.hashCode());
		result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
		result = prime * result
				+ ((endPlace == null) ? 0 : endPlace.hashCode());
		result = prime * result
				+ ((movementId == null) ? 0 : movementId.hashCode());
		result = prime * result
				+ ((startDate == null) ? 0 : startDate.hashCode());
		result = prime * result
				+ ((startPlace == null) ? 0 : startPlace.hashCode());
		result = prime * result
				+ ((stuffingPlace == null) ? 0 : stuffingPlace.hashCode());
		result = prime * result
				+ ((vehicleVO == null) ? 0 : vehicleVO.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MovementVO other = (MovementVO) obj;
		if (distanceTraveled == null) {
			if (other.distanceTraveled != null)
				return false;
		} else if (!distanceTraveled.equals(other.distanceTraveled))
			return false;
		if (endDate == null) {
			if (other.endDate != null)
				return false;
		} else if (!endDate.equals(other.endDate))
			return false;
		if (endPlace == null) {
			if (other.endPlace != null)
				return false;
		} else if (!endPlace.equals(other.endPlace))
			return false;
		if (movementId == null) {
			if (other.movementId != null)
				return false;
		} else if (!movementId.equals(other.movementId))
			return false;
		if (startDate == null) {
			if (other.startDate != null)
				return false;
		} else if (!startDate.equals(other.startDate))
			return false;
		if (startPlace == null) {
			if (other.startPlace != null)
				return false;
		} else if (!startPlace.equals(other.startPlace))
			return false;
		if (stuffingPlace == null) {
			if (other.stuffingPlace != null)
				return false;
		} else if (!stuffingPlace.equals(other.stuffingPlace))
			return false;
		if (vehicleVO == null) {
			if (other.vehicleVO != null)
				return false;
		} else if (!vehicleVO.equals(other.vehicleVO))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "MovementVO [movementId=" + movementId + ", vehicleVO="
				+ vehicleVO + ", startPlace=" + startPlace + ", endPlace="
				+ endPlace + ", stuffingPlace=" + stuffingPlace
				+ ", startDate=" + startDate + ", endDate=" + endDate
				+ ", distanceTraveled=" + distanceTraveled + ", resultCode="
				+ resultCode + "]";
	}

}
